let v = new Vue({
    el:'#main-container',
    data:{
        pageInfo:{
            pageSize:3,
        },
        article:{
            title:'',
        }
    },
    methods:{
        selectByName:function (page,pageSize) {
            axios({
                url:`main/article/selectFavByPage/${page}/${pageSize}`,
                data:this.article,
                method:'post',
            }).then(resp => {
                this.pageInfo = resp.data.obj;
            }).catch(error => {
                layer.msg(error.message);
            })
        },
        selectByPage:function (page,pageSize) {
            this.article.title = '';
            this.selectByName(page,pageSize);
        },
        toArticleDetail:function (article) {
            layer.article = article;
            layer.open({
                type: 2,
                title: '文章内容',
                area: ['60%', '80%'],
                content: 'main/article/toArticleDetail',
                end:() => {

                }
            })
        }
    },
    created:function () {
        this.selectByPage(1,this.pageInfo.pageSize);
    }
})